﻿using System;
using fastCSharp;

namespace diantou.web.tutorial
{
    /// <summary>
    /// 话题教程列表
    /// </summary>
    //[fastCSharp.code.cSharp.webView(IsPool = true)]
    partial class topic : web.topic.view<topic>
    {
        /// <summary>
        /// 教程列表
        /// </summary>
        [fastCSharp.emit.webView.clearMember]
        private userTutorial[] tutorials;
        /// <summary>
        /// 教程列表
        /// </summary>
        /// <returns>是否成功</returns>
        private new bool loadView(int topicId)
        {
            if (base.load(topicId))
            {
                subArray<diantou.dataAccess.tutorial> values = new subArray<dataAccess.tutorial>(diantou.dataAccess.clientCache.Tutorial.Get(diantou.dataAccess.tcpCall.tutorial.getIdsByTopicId(topicId)));
                tutorials = values.GetArray(value => new userTutorial { Tutorial = value, User = currentUser });
                return true;
            }
            return false;
        }
    }
}
